<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
<script>
	var submitSearchForm = function(){
		if(homeSearchForm.keyword.value.replace(/\s/g,'').length > 0){
			homeSearchForm.submit();
		}
	};
</script>
<header class="head_nav_met_11_5-header navbar-fixed-top" m-id="1" m-type="head_nav">
  <div class="container top-box">
    <div class="row">
      <div class="logo-box" style="position: relative;z-index: 1603;top:25px;">
        <a href="${basePath }" class="met-logo" title="${company.companyName}">
          <h1 hidden="">${company.companyName}</h1>
          <div class="vertical-align-middle">
            <img src="${basePath}${webSite.logoPath}" alt="${company.companyName}" /></div>
        </a>
      </div>
      <div class="search-box">
      	<div class="m-search" style="margin-right: 6px;">
          <c:if test="${empty otherLoginUser}">
          	<a href="${basePath }/otherLogin">登录</a>
          	<a href="${basePath }/register">注册</a>
          </c:if>
          <c:if test="${!empty otherLoginUser }">
          	<%-- <span class="username">欢迎你，${otherLoginUser.userName }</span> --%>
          	<a href="${basePath }/personalCenter">个人中心</a>
          	<a href="${basePath }/userlogout">注销</a>
          </c:if>
    	</div>
        <a href="${basePath }/list?all=list" class="m-search">
          <i class="icon wb-search" aria-hidden="true"></i>
        </a>
        <div class="search-index">
          <!-- <form method="post" action="/list?all=list" target="_blank" id="homeSearchForm">
            <div class="input-search">
              <button type="button" onclick="submitSearchForm()" class="input-search-btn">
                <i class="icon wb-search" aria-hidden="true"></i>
              </button>
              <input type="text" class="" name="keyword" value="" placeholder="搜索" data-fv-notempty="true" data-fv-message="不能为空" />
             </div>
          </form> -->
			<div class="input-search">
				<c:choose>
					<c:when test="${empty otherLoginUser}">
						<a href="${basePath }/otherLogin">登录</a>
						<a href="${basePath }/register">注册</a>
					</c:when>
					<c:otherwise>
						<a>欢迎您，${otherLoginUser.userName }</a>
						<a href="${basePath }/personalCenter">个人中心</a>
						<a href="${basePath }/userlogout">注销</a>
					</c:otherwise>
			</c:choose>
        </div>
        </div>
        <div class="contact-index font-size-16">
          <p class="m-0">
            <span class="tel">联系电话：${company.companyPhoneNumber}</span>&nbsp;&nbsp;|&nbsp;&nbsp;
            <span class="mail">E-mail：${company.companyEmail}</span></p>
        </div>
      </div>
    </div>
  </div>
  <nav class="navbar navbar-default box-shadow-none head_nav_met_11_5">
    <div class="container">
      <div class="row">
        <a href="${basePath}" class="met-nav-logo" title="${webSite.name}">
          <h1 hidden="">${company.companyName}</h1>
          <div class="vertical-align-middle">
            <img src="${basePath}${webSite.logoPath}" alt="${webSite.name}" /></div>
        </a>
        <button type="button" class="navbar-toggler hamburger hamburger-close collapsed  met-nav-toggler" data-target="#met-nav-collapse" data-toggle="collapse">
          <span class="sr-only"></span>
          <span class="hamburger-bar"></span>
        </button>
        <div class="collapse navbar-collapse navbar-collapse-toolbar pull-md-right p-0" id="met-nav-collapse">
          <ul class="nav navbar-nav navlist">
            <li class="nav-item">
              <c:if test="${empty type or type eq 'index'}">
              	<c:set var="currentClass" value="active" />
              </c:if>
              <a href="${basePath }" title="首页" data-title="首页" class="nav-link ${currentClass }">首页</a>
              <c:remove  var="currentClass" />
            </li>
            <li class="nav-item">
              <c:if test="${type eq 'platform'}">
              	<c:set var="currentClass" value="active" />
              </c:if>
              <a href="${basePath }/platform" title="平台动态" data-title="平台动态" class="nav-link ${currentClass }">平台动态</a>
              <c:remove  var="currentClass" />
            </li>
            <li class="nav-item">
              <c:if test="${type eq 'news'}">
              	<c:set var="currentClass" value="active" />
              </c:if>
              <a href="${basePath }/news" title="信息发布" data-title="信息发布" class="nav-link ${currentClass }">信息发布</a>
              <c:remove  var="currentClass" />
            </li>
            <li class="nav-item">
              <c:if test="${type eq 'authority'}">
              	<c:set var="currentClass" value="active" />
              </c:if>
              <a href="${basePath }/authority" title="权威解读" data-title="权威解读" class="nav-link ${currentClass }">权威解读</a>
              <c:remove  var="currentClass" />
            </li>
            <li class="nav-item">
              <c:if test="${type eq 'push'}">
              	<c:set var="currentClass" value="active" />
              </c:if>
              <a href="${basePath }/push" title="项目推送" data-title="项目推送" class="nav-link ${currentClass }">项目推送</a>
              <c:remove  var="currentClass" />
            </li>
            <li class="nav-item">
              <c:if test="${type eq 'personalCenter'}">
              	<c:set var="currentClass" value="active" />
              </c:if>
              <a href="${basePath }/personalCenter" title="项目征集" data-title="项目征集" class="nav-link ${currentClass }">项目征集</a>
              <c:remove  var="currentClass" />
            </li>
          </ul>
        </div>
      </div>
    </div>
  </nav>
</header>